package com.gitee.jjnnzb.designpatterninspring.business.openapi.entity.bo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

/**
 * @author Jjn
 * @since 2023/8/10 19:17
 */
@Data
@NoArgsConstructor
public class CommonParam {
    
    @Length(max = 1000, message = "推送正文不能超过{max}字符")
    @NotBlank(message = "推送正文不能为空")
    @Schema(description = "推送正文")
    private String content;
    
    @Length(max = 100, message = "推送标题不能超过{max}字符")
    @Schema(description = "推送标题")
    private String title;
    
    @Length(max = 30, message = "创建人不能超过{max}字符")
    @Schema(description = "创建人")
    private String creator;
    
    @NotNull(message = "推送源不能为空")
    @Schema(description = "推送源")
    private Integer source;
    
    @Length(max = 200, message = "推送理由不能超过{max}字符")
    @Schema(description = "推送理由")
    private String reason;
    
    @Schema(description = "ID")
    @NotBlank(message = "ID不能为空")
    private String id;
}
